package sceneInfo;

import java.io.Serializable;

import sceneMatch.MatchNode;

//
//	File:			ObjectInfo.java
//	Author:		Krzysztof Langner
//	Date:			1997/04/28

//  Modified by:  Paul Marlow, Amir Ghavam, Yoga Selvaraj
//  Course:       Software Agents
//  Date Due:     November 30, 2000

//  Modified again by Kevin Lam
//                 October 19, 2004
//                 added SceneTable col/row attributes

//***************************************************************************
//
/**	This is base class for different classes with visual information
 *	about objects
 * 
 */
public class ObjectInfo extends MatchNode implements Serializable
{

	private static final long serialVersionUID = 1L;
	
	private String m_type;
	private float m_distance;
	private float m_direction;
	private float m_distChange;
	private float m_dirChange;

	private int m_tableRow;
	private int m_tableCol;


	/** Constructor
	 * 
	 * @param type The type of object it is
	 */
	public ObjectInfo(String type)
	{
		m_type = type;
		m_distance = 0;
		m_direction = 0;
		m_distChange = 0;
		m_dirChange = 0;
		m_tableRow = -1;
		m_tableCol = -1;
	}
	
	/**
	 * hope this calls the subclass method
	 */
	public String toString(){
		return "[object at "+m_distance+"m in dir:"+m_direction+"]";
	}
	
	//Getter methods
	public float getDistance()
	{
		return m_distance;
	}

	public float getDirection()
	{
		return m_direction;
	}

	public float getDistChange()
	{
		return m_distChange;
	}

	public float getDirChange()
	{
		return m_dirChange;
	}

	public String getType()
	{
		return m_type;
	}

	public int getTableColumn()
	{
		return m_tableCol;
	}

	public int getTableRow()
	{
		return m_tableRow;
	}


	//Setter methods
	public void setTableColumn(int i)
	{
		m_tableCol = i;
	}


	public void setTableRow(int i)
	{
		m_tableRow = i;
	}

	public void setDirChange(float change) {
		m_dirChange = change;
	}

	public void setDirection(float m_direction) {
		this.m_direction = m_direction;
	}

	public void setDistance(float m_distance) {
		this.m_distance = m_distance;
	}

	public void setDistChange(float change) {
		m_distChange = change;
	}
	
	public void setType(String type){
		m_type = type;
	}

	
}

